package com.cjm.one.goods.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cjm.one.model.goods.dto.StockDeductionDTO;
import com.cjm.one.model.goods.dto.StockRevertDTO;
import com.cjm.one.model.goods.entity.GoodsBrowseHistory;
import com.cjm.one.model.goods.entity.GoodsSku;
import com.cjm.one.model.goods.vo.GoodsSkuBrowseHistoryVo;
import com.cjm.one.model.goods.vo.GoodsSkuCartVo;
import com.cjm.one.model.goods.vo.GoodsSkuVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
* @author 29289
* @description 针对表【goods_sku】的数据库操作Mapper
* @createDate 2024-09-05 16:07:00
* @Entity com.one.goods.entity.GoodsSku
*/
public interface GoodsSkuMapper extends BaseMapper<GoodsSku> {

    Page<GoodsSkuVo> selectPageByCollection(Page<GoodsSkuVo> page, Long id);

    Page<GoodsSku> selectPageByBrowseHistory(Page<Object> objectPage, Long id);

    Page<GoodsSkuCartVo> selectPageByCart(Page<GoodsSkuCartVo> goodsSkuPage,@Param("id") Long id);

    List<GoodsSkuCartVo> selectListByIds(@Param("ids") Long[] ids,@Param("customId") Long customId);

    int batchDeductionStock(@Param("skus") List<StockDeductionDTO> skus);

    int batchRevertStock(@Param("stockRevertDTOS")List<StockRevertDTO> stockRevertDTOS);

    Page<GoodsSkuVo> selectPageGoodsBrowseHistoryList(Page<GoodsSkuVo> page, Long id);
}




